package com.digital.library.modules.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.digital.library.modules.system.domain.SysLog;
import com.digital.library.modules.system.mapper.SysLogMapper;
import com.digital.library.modules.system.service.SysLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;


/**
 * 系统日志表 服务实现类
 */
@Service
@Slf4j
public class SysLogServiceImpl implements SysLogService {

	@Resource
	private SysLogMapper sysLogMapper;


	@Override
	public void removeAll() {
		sysLogMapper.removeAll();
	}

	@Override
	public Long findTotalVisitCount() {
		return sysLogMapper.findTotalVisitCount();
	}

	@Override
	public Long findTodayVisitCount(Date dayStart, Date dayEnd) {
		return sysLogMapper.findTodayVisitCount(dayStart,dayEnd);
	}

	@Override
	public Long findTodayIp(Date dayStart, Date dayEnd) {
		return sysLogMapper.findTodayIp(dayStart,dayEnd);
	}

	@Override
	public int save(SysLog sysLog) {
		return sysLogMapper.save(sysLog);
	}

}
